Skip to content

Merge #7138#7139

Open
alextwoods wants to merge 1 commit into
masterfrom
alexwoo/merge_en-bucket-system-tags
Open

Merge #7138#7139
alextwoods wants to merge 1 commit into
masterfrom
alexwoo/merge_en-bucket-system-tags

Conversation

@alextwoods

Copy link
Copy Markdown
Collaborator

Merge PR #7138
(Run CI on changes from fork repo)

@alextwoods alextwoods requested a review from a team as a code owner July 13, 2026 20:53
Amazon S3 event notifications delivered to SNS, SQS, and Lambda now
include an `awsGeneratedTags` map on the `bucket` object when system
tags are enabled on the source bucket. The Java SDK model did not
round-trip this field, so consumers had to fall back to raw JSON
parsing to read the tags.

This change adds `Map<String, String> awsGeneratedTags` to `S3Bucket`
and threads it through the reader and writer:

  * `S3Bucket`: adds `awsGeneratedTags` field with a getter, a new
    four-argument constructor, and updates `equals`/`hashCode`/
    `toString`. The pre-existing three-argument constructor is
    preserved so existing callers are source- and behavior-compatible.
    Tags are defensively copied on construction and returned as an
    unmodifiable view.
  * `DefaultS3EventNotificationReader`: parses `awsGeneratedTags` as
    `Map<String, String>`. Absent field yields `null`. Null value
    entries are preserved. Non-string values throw
    `IllegalArgumentException` with a helpful message including the
    offending key and value.
  * `DefaultS3EventNotificationWriter`: emits `awsGeneratedTags` only
    when the map is non-null and non-empty, matching S3's server-side
    `@JsonInclude(NON_EMPTY)` behavior so round-tripped output is
    indistinguishable from what S3 emits.

Also bumps `eventVersion` fixtures in the module test files from
`2.4` to `2.5` to reflect the schema version emitted alongside this
launch.

The change is fully additive:
  * Older SDKs remain compatible with new payloads (unknown fields
    are ignored during parse).
  * Newer SDKs remain compatible with old payloads
    (`getAwsGeneratedTags()` returns `null` when the field is absent).
@alextwoods alextwoods force-pushed the alexwoo/merge_en-bucket-system-tags branch from 2765ca7 to 0b1c256 Compare July 14, 2026 18:17
@alextwoods alextwoods added the api-surface-area-approved-by-team Indicate API surface area introduced by this PR has been approved by team label Jul 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api-surface-area-approved-by-team Indicate API surface area introduced by this PR has been approved by team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants